// src/subjectApi.js
import { apiClient } from './base'

export const getSubjects = (params) => 
  apiClient.get('/subjects', { params })

export const getSubjectTree = () => 
  apiClient.get('/subjects/tree')

export const createSubject = (data) => 
  apiClient.post('/subjects', data)

export const updateSubject = (id, data) => 
  apiClient.put(`/subjects/${id}`, data)

export const deleteSubject = (id) => 
  apiClient.delete(`/subjects/${id}`)

export const updateSubjectStatus = (id, status) => 
  apiClient.patch(`/subjects/${id}/status`, null, { params: { status } })